package com.kaifa.mybatis.dao;

import com.kaifa.mybatis.bean.UserBean;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

public interface UserMapper {

    /**
     * 根据uid主键进行查询
     * @param uid
     * @return UserBean
     */
    public UserBean getUserByUid(Integer uid);

    /**
     * 添加用户
     * @param userBean
     */
    public void addUser(UserBean userBean);

    /**
     * 修改用户
     * @param userBean
     * @return
     */
    public Integer updateUser(UserBean userBean);

    /**
     * 删除用户
     * @param uid
     */
    public void deleteUserByUid(Integer uid);


    public UserBean getUserByUidAndUsername(@Param("id") Integer uid, @Param("userName") String username);

    public UserBean getUserByMap(Map<String,Object> map);

}
